package repository

import (
	"context"
	"github.com/starmotioncf/common/third_account"
	"github.com/starmotioncf/soutchatinternal/model"
)

type AccountRepository interface {
	//GetAuthByIdentifier 获取用户auth记录
	GetAuthByIdentifier(ctx context.Context, identityType third_account.IdentityType, identifier string) (m *model.UserAuth, err error)
	//CreateAuth 创建用户auth记录
	CreateAuth(ctx context.Context, m *model.UserAuth) error
	////UnbindAuth 解绑账户
	UnbindAuth(ctx context.Context, uid uint64, identType third_account.IdentityType) error
	////GetBindAuths 获取uid绑定账户数量
	//GetBindAuths(ctx context.Context, uid uint64) (int64, error)
	LoginAuth(ctx context.Context, userAuth *model.UserAuth, accessToken string, expireTs int64) error
	//UpdatePassword(ctx context.Context, userAuth *model.VcUserAuth, password string) error
	////GetCurrentAccessToken 获取当前用户的token
	//GetCurrentAccessToken(ctx context.Context, uid uint64) string
	//RemoveAccessToken(ctx context.Context, uid uint64) error
	//ExistsByMobilePhone(ctx context.Context, mobilePhone string) (bool, error)
	//GetAuthByUidAndType(ctx context.Context, uid uint64, identType constant.IdentityType) (m *model.VcUserAuth, err error)
	//GetLastLoginByMac(ctx context.Context, mac string) (m *model.VcUserAuth, err error)
	//GetUserAuthList(ctx context.Context, uid uint64) (m []*model.VcUserAuth, err error)
	//CreateLog(ctx context.Context, m *model.VcUserLoginLog) error
	//GetCountByMac(ctx context.Context, mac string) int64
	//GetCountByIp(ctx context.Context, loginIp string, afterTime time.Duration) int64
	//GetCountByMacAndTimes(ctx context.Context, mac string, afterTime time.Duration) int64
	// CreateRegisterInfo 创建用户的注册信息
	CreateRegisterInfo(ctx context.Context, m *model.UserRegisterInfo) error
	// CreateLoginRecord 创建用户的登陆信息
	CreateLoginRecord(ctx context.Context, m *model.UserLoginRecord) error
}
